﻿using System.ComponentModel.DataAnnotations.Schema;
using Sharp.Domain.PlatformBoundedContext.MasterDataModule.Aggregates;
using Sharp.Domain.Model;
using Sharp.Infrastructure;
using System;

namespace Sharp.Domain.PlatformBoundedContext.PersonModule.Aggregates
{
    public partial class Employee : Person, IAggregateRoot<int>, IStandardState, ILogCreatedEntity, ILogModifiEntity, ILogDeleteEntity
    {

        public Employee()
        {

        }
        /// <summary>
        /// 工号
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 岗位
        /// </summary>
        public int? JobId { get; set; }

        /// <summary>
        /// 参加工作
        /// </summary>
        public string WorkDate { get; set; }

        /// <summary>
        /// 岗位
        /// </summary>
        [ForeignKey("JobId")]
        public virtual Job Job { get; set; }

        /// <summary>
        /// 学历
        /// </summary>
        [Index]
        public string EducationalBackgroundCode { get; set; }
        /// <summary>
        /// 职务
        /// </summary>
        public string JobTitle { get; set; }

        /// <summary>
        /// 紧急联系人
        /// </summary>
        public string UrgentContact { get; set; }
        /// <summary>
        /// 紧急联系电话
        /// </summary>
        public string UrgentPhone { get; set; }
        /// <summary>
        /// 婚姻状况代码
        /// </summary>
        [Index]
        public string MarriedCode { get; set; }

        /// <summary>
        /// 任职状况
        /// </summary>
        [Index]
        public string PostStateCode { get; set; }
        /// <summary>
        /// 职称
        /// </summary>
        [Index]
        public string PosttitleCode { get; set; }
        /// <summary>
        /// 相片
        /// </summary>
        public string PicUrl { get; set; }
        /// <summary>
        /// 学历代码
        /// </summary>
        public string DegreeCode { get; set; }
        [Index("IX_EntityStateCreatedUserId", 0)]
        public EntityStateOperate EntityState { get; set; }
        public DateTime? DeleteTime { get; set; }
        public int? DeleteUserId { get; set; }
        public DateTime? CreatedTime { get; set; }
        [Index("IX_EntityStateCreatedUserId", 1)]
        public int? CreatedUserId { get; set; }
        public DateTime? ModifiTime { get; set; }
        public int? ModifiedUserId { get; set; }
    }
}